define(function(require, exports, module) {
    'use strict';

    var $ = require('jquery');

    var isErrShow = $('.pay-error').length > 0;

    if(isErrShow){
        var $count = $('.jCountTime');
        var num = Number($count.text());
        var href = $count
        var timer = setInterval(function(){
            num--;
            $('.jCountTime').text(num);
            if(num == 0){
                clearInterval(timer);
                window.location.href = $PAGE_DATA.url.index;
                return false;
            }
        },1000);
    }

});
